import App from "../App";
import City from "../pages/city";
import Crah from "../pages/crah";
import Deail from "../pages/deail";
import Error from "../pages/Error";
import Home from "../pages/home";
import List from "../pages/list";
import Login from "../pages/login";
import My from "../pages/my";
import {createBrowserRouter} from 'react-router-dom'

export const router = createBrowserRouter([
  {
    path: "/",
    element: <App></App>,
    children:[
        {
            index:true,
            element:<Home></Home>
        },
        {
            path:'home',
            element:<Home></Home>
        },
        {
            path:'my',
            element:<My></My>
        },
    ]
  },
  {
    path:"/login",
    element:<Login></Login>
  },
  {
    path:"/list",
    element:<List></List>
  },
  {
    path:"/city",
    element:<City></City>
  },
  {
    path:"/crah",
    element:<Crah></Crah>
  },
  {
    path:"/deail",
    element:<Deail></Deail>
  },
  {
    path:"*",
    element:<Error></Error>
  },
]);